package com.chenshu.shop.mapper;

import com.chenshu.shop.model.Cart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2024-06-12
 * Time：17:02
 */
@Mapper
public interface CartMapper {
    public Integer insertCart(@Param("userId") Integer userId, @Param("goodId") Integer goodId);

    public List<Cart> selectCardsByUid(Integer userId);

    public Cart checkCart(@Param("userId") Integer userId, @Param("goodId") Integer goodId);

    public Integer updateCart(@Param("userId") Integer userId, @Param("goodId") Integer goodId);

    public Integer addCart(Integer id);

    public Integer lessCart(Integer id);

    public Integer deleteCart(Integer id);

    public Integer selectCardsCount(Integer uid);
}
